package com.sinosoft.msf.base.supplier.service;

import cn.hutool.core.util.IdUtil;
import com.sinosoft.msf.base.supplier.dao.base.SRequestLogMapper;
import com.sinosoft.msf.base.supplier.pojo.entity.SRequestLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class AsyncSupService {
    @Autowired
    SRequestLogMapper sRequestLogMapper;
    @Async
    public void saveReqHis(SRequestLog requestLog, String agentNo) {
        requestLog.setId(IdUtil.simpleUUID());
        requestLog.setCreatedDate(new Date());
        requestLog.setCreatedId(agentNo);
        sRequestLogMapper.insert(requestLog);
    }
}
